#ifndef RESERVATION_RECORD_H
#define RESERVATION_RECORD_H

#include <QWidget>
#include <QSqlTableModel>
#include "export_excel_object.h"
#include <control/contrl_logic.h>
#define RESERVATION_SQL  "select * from reservation "
namespace Ui {
class ReservationRecord;
}

class ReservationRecord : public QWidget
{
    Q_OBJECT

public:
    explicit ReservationRecord(QWidget *parent = nullptr);
    ~ReservationRecord();

    void export_excel();
private slots:
    void on_export_btn_clicked();

    void on_update_btn_clicked();

    void setTimeEdit();
    void on_select_clicked();

    void on_clear_btn_clicked();

    void on_create_table_btn_clicked();
signals:
    void signOtherChart(QString,QMap<QString , int>);
private:
    Ui::ReservationRecord *ui;
    ExportExcelObject exportExcle;
    QSqlQueryModel * model;
    QString lastQuery="";
};

#endif // RESERVATION_RECORD_H
